  <% if @sideffect.blank? %>
    <strong>Click Sideffect to Show Details</strong>
  <% else %>
    <strong><%= h(@sideffect.name) unless @sideffect.blank?%></strong> caused by <strong><%= @detail_sideffects.length%></strong> drugs:
  <table width="100%" border="1"> 
      <tr>
        <td>
          Drug
        </td>
        <td>
          Frequency
        </td>
        <td>
          Score
        </td>
      </tr>
    <% @detail_sideffects.each do |detail| %>
      <tr>
        <td align="left">
          <strong><%= link_to(h(detail["name"]), :action => "show_drug", :id => detail["id"]) %></strong>
        </td>
        <td align="right">
        <strong><%=sprintf("%2.2f", 100.0 * detail["cnt"].to_i/ Drug.find(detail["id"]).get_rating_count(session[:sex_c] || "All", session[:age_c] || "All", session[:time_taken_c] || "All")) + "%"%></strong>
        </td>
        <td align="right">
          <strong><%= sprintf("%2.1f", Drug.find(detail["id"]).get_rating)%></strong>
        </td>
      </tr>
    <% end %>
  </table>
<% end %>
